package cn.peach.hrm.feign.client;

import cn.peach.hrm.domain.Login;
import cn.peach.hrm.dto.LoginMealDto;
import cn.peach.hrm.util.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@RequestMapping("/login")
@FeignClient(value = "auth-server", fallbackFactory = LoginFeignClientFallbackFactory.class)
public interface LoginFeignClient {

    @RequestMapping(value="/save",method= RequestMethod.POST)
    AjaxResult save(@RequestBody Login login);

    // 保存一个login和套餐
    @RequestMapping(value="/saveLoginAndMeal",method= RequestMethod.POST)
    AjaxResult saveLoginAndMeal(@RequestBody LoginMealDto loginMealDto);
}
